<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------

/***
 * $url 
 * $param=array('id'=>'1','name'=>'sharx');
 */
function post_submit_xml($url,$params){
	$client = new \GuzzleHttp\Client();
	$response=$client->request('POST',$url, [
		'form_params' => $params]);
	if($response->getStatusCode()!=200){
		return  null;
	}else{
		$result=$response->getBody()->getContents();
		$obj=json_decode(json_encode(simplexml_load_string($result),TRUE),TRUE);
		if(empty($obj)){
			return null;
		}else{
			return $obj;
		}
	}
}
